#!/bin/sh

if [ -e /etc/config/wireless ]
then

	uci set wireless.mt7615e5.autoch_skip="52;56;60;64"
	uci commit wireless

	channel_5=$(uci get wireless.mt7615e5.channel)

	if [ "52" == ${channel_5} -o "56" == ${channel_5} -o "60" == ${channel_5} -o "64" == ${channel_5} ]
	then
		uci set wireless.mt7615e5.channel=0
		uci commit wireless
	fi

	wisp5genable=$(uci get wireless.@wifi-iface[2].ApCliEnable)

	if [ X"" == X${wisp5genable} ]
	then
		uci set wireless.@wifi-iface[2].ApCliEnable=0
		uci commit wireless
	fi
fi

exit 0

